import logging

log_filename = 'tensorflow.log'

logging.basicConfig(filename=log_filename, filemode='a', level=logging.DEBUG)

logging.info("hello")